#ifndef SENSORVIEWERPC_H
#define SENSORVIEWERPC_H

#include <QtWidgets/QMainWindow>
#include "uiofmainwindow.h"
#include "datatrans.h"
class DataViewer;
class SensorViewerPC : public QMainWindow, public UiOfMainWindow
{
	Q_OBJECT

public:
	SensorViewerPC(QWidget *parent = 0);
	~SensorViewerPC();
private:
	QString getLocalIP();
	DataRecvThread server;
	QHash<QString, DataViewer*> viewers; 
	bool event(QEvent* e);
	void closeEvent(QCloseEvent* e);
	void initMap();
private slots:
	void openAccelerometer();
	void openTemperature();
	void openGravity();
	void openGyroscope();
	void openLight();
	void openLinearAcceleration();
	void openMagnetic();
	void openOrientation();
	void openPressure();
	void openProximity();
	void openHumidity();
	void openRotationVector();
    void subWinClose(const QString& win_name);
	void aboutApp();
	void closeMainWin();
};

#endif // SENSORVIEWERPC_H
